import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import "normalize.css/normalize.css"
import * as API from "@/http/api"
import * as _ from "lodash"
import MBX from "@/components/mianbao.vue"
import Moment from "moment"
Vue.component("MBX", MBX)
Vue.config.productionTip = false
Vue.prototype.$API = API
import VueQuillEditor from 'vue-quill-editor'


// 富文本央视
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)


Vue.filter("time", function (v) {
  return Moment().format('YYYY/MM/DD hh:mm:ss')
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

//路由守卫
router.beforeEach((to, from, next) => {
  console.log('1111', to)
  const arr = to.matched.some(item => {
    return item.auth
  })
  if (arr) {
  } else {
    next()
  }
})
